<!--
  Generated template for the UploadPlantManagerPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar no-border>
    <ion-title>上传管理</ion-title>
  </ion-navbar>
  <div class="ty-line1"></div>
  <ion-segment mode="md" [(ngModel)]="type">
    <ion-segment-button value="hadUpload">
      已上传
    </ion-segment-button>
    <ion-segment-button value="review">
      审核中
    </ion-segment-button>
    <ion-segment-button value="waitLoad">
      待上传
    </ion-segment-button>

  </ion-segment>
</ion-header>


<ion-content class="ion-content-background-partingline" no-padding [ngSwitch]="type">

  <!-- <ion-refresher (ionRefresh)="doRefresh1($event)" *ngSwitchCase="'waitLoad'">
    <ion-refresher-content pullingText="下拉刷新"></ion-refresher-content>
  </ion-refresher> -->
  <ion-list *ngSwitchCase="'waitLoad'">
    <plant-item *ngFor="let item of waitLoadArray" (click)="waitLoadClicked(item)" [item]="item">
    </plant-item>
    <!-- <ion-infinite-scroll *ngIf="waitLoadArray.length<total1" (ionInfinite)="doInfinite1($event)">
      <ion-infinite-scroll-content loadingText="正在加载..."></ion-infinite-scroll-content>
    </ion-infinite-scroll> -->
    <ion-custom-empty *ngIf="total1==0"></ion-custom-empty>
  </ion-list>


  <ion-refresher (ionRefresh)="doRefresh2($event)" *ngSwitchCase="'hadUpload'">
    <ion-refresher-content pullingText="下拉刷新"></ion-refresher-content>
  </ion-refresher>
  <ion-list *ngSwitchCase="'hadUpload'">
    <plant-item *ngFor="let item of hadUploadArray" (click)="hadUploadClicked(item)" [item]="item">
    </plant-item>
    <ion-custom-empty *ngIf="total2==0"></ion-custom-empty>
    <ion-allitem-showed-bottom *ngIf="hadUploadArray.length>=total2&&hadUploadArray.length>0"></ion-allitem-showed-bottom>

    <ion-infinite-scroll *ngIf="hadUploadArray.length<total2" (ionInfinite)="doInfinite2($event)">
      <ion-infinite-scroll-content loadingText="正在加载..."></ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </ion-list>
  <ion-refresher (ionRefresh)="doRefresh3($event)" *ngSwitchCase="'review'">
    <ion-refresher-content pullingText="下拉刷新"></ion-refresher-content>
  </ion-refresher>
  <ion-list *ngSwitchCase="'review'">
    <plant-item *ngFor="let item of reviewArray" (click)="reviewClicked(item)" [item]="item">
    </plant-item>
    <ion-custom-empty *ngIf="total3==0"></ion-custom-empty>
    <ion-allitem-showed-bottom *ngIf="reviewArray.length>=total3&&reviewArray.length>0"></ion-allitem-showed-bottom>

    <ion-infinite-scroll *ngIf="reviewArray.length<total3" (ionInfinite)="doInfinite3($event)">
      <ion-infinite-scroll-content loadingText="正在加载..."></ion-infinite-scroll-content>
    </ion-infinite-scroll>
  </ion-list>


</ion-content>